﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using AiLuWeb.Business;
using AiLuWeb.Model;
using AiLuWeb.WebSite.Code;
using Ajeelee.Core.Utils;

namespace AiLuWeb.WebSite
{
    public partial class index : PageBase
    {
        Hashtable table = new Hashtable();
        protected IList<PhotoImgs> photoImgsList = new List<PhotoImgs>();       //焦点图片
        protected LanMuInfo lanMuInfo = new LanMuInfo();                        //关于博才
        protected IList<Products> productList = new List<Products>();           //产品中心
        protected IList<Links> linksList = new List<Links>();                   //友情链接
        IJobBusiness jobBll = new JobBusinessFactory().CreateJobBusiness();
        IProductsBusiness productsBll = new ProductsBusinessFactory().CreateProductsBusiness();
        ILanMuInfoBusiness lanMuInfoBll = new LanMuInfoBusinessFactory().CreateLanMuInfoBusiness();
        ILinksBusiness linksBll = new LinksBusinessFactory().CreateLinksBusiness();
        IPhotoImgsBusiness photoBll = new PhotoImgsBusinessFactory().CreatePhotoImgsBusiness();

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //焦点图片
                table.Clear();
                table.Add(PhotoImgsHash.CId, 2);
                photoImgsList = photoBll.GetAllPhotoImgs(table);

                //关于博才
                lanMuInfo = lanMuInfoBll.GetById(5);

                //产品中心
                table.Clear();
                table.Add(ProductsHash.TopNum, 4);
                table.Add(ProductsHash.Top, "A");
                productList = productsBll.GetAllProducts(table);

                //友情链接
                //linksList = Utility.GetLinks();
            }
            catch (Exception ex)
            {
                Function.WriteErrorLog(ex);
            }
        }
    }
}